<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="zh" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta content="text/html;charset=UTF-8" http-equiv="Content-Type"/>
    <link href="../jacoco-resources/report.css" rel="stylesheet" type="text/css"/>
    <link href="../jacoco-resources/report.gif" rel="shortcut icon" type="image/gif"/>
    <title>RepayMCDCCoverageTest.java</title>
    <link href="../jacoco-resources/prettify.css" rel="stylesheet" type="text/css"/>
    <script src="../jacoco-resources/prettify.js" type="text/javascript"></script>
</head>
<body onload="window['PR_TAB_WIDTH']=4;prettyPrint()">
<div class="breadcrumb" id="breadcrumb"><span class="info"><a class="el_session"
                                                              href="../jacoco-sessions.html">Sessions</a></span><a
        class="el_report" href="../index.html">LogicalCoverageCaseStudy$RepayMCDCCoverageTest.exec</a> &gt; <a
        class="el_package" href="index.source.html">edu.sei.st.logicalcoverage</a> &gt; <span class="el_source">RepayMCDCCoverageTest.java</span>
</div>
<h1>RepayMCDCCoverageTest.java</h1>
<pre class="source lang-java linenums">package edu.sei.st.logicalcoverage;

import org.junit.jupiter.api.Test;

import java.math.BigDecimal;

import static org.junit.jupiter.api.Assertions.assertEquals;

<span class="fc" id="L9">class RepayMCDCCoverageTest {</span>

    @Test
    void doRepay() {
        // [T] [T] [T] // [T] - // [T]
<span class="fc" id="L14">        Repay repaySuccessA = new Repay(true, true, new BigDecimal(1024), true, false, new BigDecimal(1024));</span>
<span class="fc" id="L15">        assertEquals(Result.success, repaySuccessA.doRepay());</span>

        // T T T // F T // T
<span class="fc" id="L18">        Repay repaySuccessB = new Repay(true, true, new BigDecimal(1024), false, true, new BigDecimal(1024));</span>
<span class="fc" id="L19">        assertEquals(Result.success, repaySuccessB.doRepay());</span>

        // T T T // T - // F
<span class="fc" id="L22">        Repay repayNotEnough = new Repay(true, true, BigDecimal.ONE, true, false, BigDecimal.ONE);</span>
<span class="fc" id="L23">        assertEquals(Result.notEnough, repayNotEnough.doRepay());</span>

        // T T T // [F] F // -
<span class="fc"
      id="L26">        Repay repayRet = new Repay(true, true, BigDecimal.ONE, false, false, BigDecimal.ONE);</span>
<span class="fc" id="L27">        assertEquals(Result.ret, repayRet.doRepay());</span>

        // [F] - - // - - // -
<span class="fc" id="L30">        Repay repayInvalidA = new Repay(false, true, BigDecimal.ONE, false, false, BigDecimal.ONE);</span>
<span class="fc" id="L31">        assertEquals(Result.invalid, repayInvalidA.doRepay());</span>

        // T [F] - // - - // -
<span class="fc" id="L34">        Repay repayInvalidB = new Repay(true, false, BigDecimal.ONE, false, false, BigDecimal.ONE);</span>
<span class="fc" id="L35">        assertEquals(Result.invalid, repayInvalidB.doRepay());</span>

        // T T [F] // - - // -
<span class="fc" id="L38">        Repay repayInvalidC = new Repay(true, true, BigDecimal.ZERO, false, false, BigDecimal.ONE);</span>
<span class="fc" id="L39">        assertEquals(Result.invalid, repayInvalidC.doRepay());</span>
<span class="fc" id="L40">    }</span>
}
</pre>
<div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.7.202105040129</span>
</div>
</body>
</html>
